using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ENT_Entidades;

namespace PQT_Usuarios.UI
{
    public partial class frmLogin : Form
    {
        public const string idFrmLogin = "b17abee2-5fd0-44ea-aa71-eac5bf0b3ba7";

        public frmLogin()
        {
            
            InitializeComponent();
        }

        private void frmLogin_Load(object sender, EventArgs e)
        {
            
            
        }

        private void cmdOK_Click(object sender, EventArgs e)
        {
            ctrlLogin ctrl = ctrlLogin.getInstance();

            bool valido = ctrl.validarUsuario(cboUserName.Text, txtPassword.Text);

            if (valido)
            {
                this.DialogResult = DialogResult.Yes;
                ctrl.Cerrar(this);
            }
            else
            {
                this.DialogResult = DialogResult.No;
            }

        }

        //#region IEntidad Members

        //public clsOID OID
        //{
        //    get
        //    {
        //        return ((IEntidad)this)._OID;
        //    }
        //    set
        //    {
        //        ((IEntidad)this)._OID = value;
        //    }
        //}

        //#endregion
    }
}